package io.hxci.modules.zhangcong.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hxci.common.utils.R;
import io.hxci.modules.zhangcong.domain.Zcdict;
import io.hxci.modules.zhangcong.service.ZcdictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController //注解
@RequestMapping("zcdict")
public class ZcDictController {
    @Autowired
    ZcdictService zcdictService;

    @RequestMapping("oplist")
    public R oplist(){
        List<Zcdict> zmlist =zcdictService.list(new QueryWrapper<Zcdict>().eq("type","politic"));
        List<Zcdict> zclist =zcdictService.list(new QueryWrapper<Zcdict>().eq("type","technical"));
        return R.ok().put("zmlist", zmlist).put("zclist", zclist);
    }

}
